package model

import (
	"gorm.io/gorm"
	"time"
)

type ReceiveGift struct {
	Id        int64          `gorm:"column:id;type:bigint(20);primaryKey;not null;" json:"id"`
	UserId    int64          `gorm:"column:user_id;type:bigint(20);comment:给礼物人id;not null;" json:"user_id"`                                   // 给礼物人id
	GiftId    int64          `gorm:"column:gift_id;type:bigint(20);comment:礼物id;not null;" json:"gift_id"`                                     // 礼物id
	Notes     string         `gorm:"column:notes;type:varchar(255);comment:接收礼物备注;not null;" json:"notes"`                                     // 接收礼物备注
	ReceiveId int64          `gorm:"column:receive_id;type:bigint(20);comment:接收礼物id;not null;" json:"receive_id"`                             // 接收礼物id
	RoomId    int64          `gorm:"column:room_id;type:bigint(20);comment:直播间id;not null;" json:"room_id"`                                    // 直播间id
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);comment:创建时间;not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"` // 创建时间
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);comment:修改时间;not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"` // 修改时间
	DeletesAt gorm.DeletedAt `gorm:"column:deletes_at;type:datetime(3);comment:删除时间;default:NULL;" json:"deletes_at"`                          // 删除时间
}

func (ReceiveGift) TableName() string {
	return "receive_gift"
}
